package com.slf.engine.services.impl;

import java.io.BufferedOutputStream;
import java.io.IOException;

import org.apache.log4j.Logger;
import org.apache.log4j.Priority;

import com.slf.engine.utils.SocketUtil;

public class BaseService {
	
	private static final Logger log = Logger.getLogger(BaseService.class);
	private BufferedOutputStream out = null;
	
	public void sendMsg(String msg) throws IOException
	{
		out = new BufferedOutputStream(SocketUtil.getInStantClient().getOutputStream());
		log.log(Priority.INFO, "sendMsg:" + msg);
		out.write(msg.getBytes());
		out.flush();
	}
}
